#ifndef VIRTUALDEVICE_H
#define VIRTUALDEVICE_H

#include <QObject>
#include "ivirtualdevice.h"

class VirtualDevice : public IVirtualDevice
{
    Q_OBJECT
public:
    VirtualDevice();
    ~VirtualDevice();
    int sendTimeFunc(const QString &opt, const QString &timeName);
    int sendCommand(const QString &opt, const QString &cmdName, const QByteArray &data);
    int getKeyState();
    CountResultDao *getFPGAResult();
    QString getOptName();
    QString getTimeFuncResult();
    bool isValid();
    QString getFaultDescription();
    static VirtualDevice *getInstance();

public slots:
    void onSerialDataArrived(const QByteArray &data);

private:
    QString optName;

};

#endif // VIRTUALDEVICE_H
